<!--授权书-->
<style scoped lang="less">
  .r-txt {
    text-align: right;
    width:75%;
  }
</style>

<template>
  <div class="contain">
    <div class="text-list mb30">
      <li class="displayflex">
        <span class="l-txt flex1">授权单位</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="医疗器械经销商">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">单位类型</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="经销商">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">是否总代</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="是">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">授权范围</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="医疗器械">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">授权日期</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="2012-07-10">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">期限类型</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="有期限">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">有效期至</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="2022-07-10">
      </li>
    </div>

    <uploader :title="'授权书'" :img-list="imgList" :max="max"></uploader>
  </div>
</template>

<script>
import uploader from '@/components/share/imageUploader/imageUploader.vue';
export default {
  name: 'Authorization',
  components: {
    uploader,
  },
  data() {
    return {
      viewOnly: true,
      imgList: [],
      max:9,
    };
  },
  watch: {
  },
  computed: {
    userinfo(){
      return localStorage.getItem('userinfo') === null?null:JSON.parse(localStorage.getItem('userinfo'));
    }
  },
  created() {
    this.SetPageType();
    this.GetData();
  },
  mounted() {
    this.$nextTick(function() {
    });
  },
  methods: {
    GetData(){
      let args = JSON.parse('["/File/Index/L3VwbG9hZHMvMjAxODA1LzE3ZjJhMWY3NGEwNzQzY2U4N2ZiNGU4YTk5ZTllOWQ4","/File/Index/L3VwbG9hZHMvMjAxODA1LzZjZmQ3ZTBhNmIzMjQyNjk4Zjk4YzkyZjNjMDY3MmZl"]');
      args.forEach(x => {
        if(x){
          this.imgList.push(x);
        }
      });
    },

    SetPageType(){
      if(this.viewOnly){
        this.max = 0;
      }
    }
  }
  
}
</script>
